Conversation
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: ca29b14ba9
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| return { | ||
| rows, | ||
| totalRoots: roots.length, | ||
| hasMoreRoots: roots.length > visibleRootCount, | ||
| pinnedRows, | ||
| unpinnedRows, | ||
| totalRoots: unpinnedRoots.length, | ||
| hasMoreRoots: unpinnedRoots.length > visibleRootCount, |
There was a problem hiding this comment.
Keep expand/pagination available when many threads are pinned
Because totalRoots now excludes pinned roots, the “More…” toggle in ThreadList (which only renders when totalThreadRoots > 3) can disappear even when the workspace still has more threads to page in (e.g., the user pins most of the first page so unpinnedRoots.length <= 3 while nextCursor is still non-null). In that case there is no way to expand, so the “Load older…” button never becomes reachable and older threads become inaccessible. This regression only shows up once many roots are pinned and the server still has additional pages.
Useful? React with 👍 / 👎.
Motivation
Description
pinThread,unpinThread,isThreadPinned,getPinTimestamp) insrc/features/threads/hooks/useThreads.ts, plus auto-unpin on archive and cross-tab sync via thestorageevent.useThreadRowsto returnpinnedRowsandunpinnedRowsand acceptworkspaceId+getPinTimestampso pin state influences ordering (src/features/app/hooks/useThreadRows.ts).ThreadList, and passcanPinto the context menu trigger (src/features/app/components/ThreadList.tsx).Sidebar,WorktreeSection, and layout wiring (useSidebarMenus,useLayoutNodes,App.tsx) and add Pin/Unpin items to the thread context menu (src/features/app/hooks/useSidebarMenus.ts,src/features/app/components/Sidebar.tsx,src/features/app/components/WorktreeSection.tsx,src/features/layout/hooks/useLayoutNodes.tsx).src/styles/sidebar.css.Testing
npm run lint; lint completed but the environment prints a non-blocking TypeScript-ESLint compatibility warning for TypeScript 5.8.3 (no lint errors remain after fixes).npm run typecheck; TypeScript typecheck succeeded with no errors.Codex Task